<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--通知IE采用其支持的最新模式-->
    <meta http-equiv="X-UA-COMPATIBLE" CONTENT="IE=EDGE"/>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <title></title>
    <style>
        #Section1,#Section2,#Section3{

            height:720px;
        }
        #Section1{

           background:#000;
        }
        #Section2{

            background:#f60;
        }
        #Section3{

            background:gray;
        }
        #nav{
            position:fixed;
            top:20px;
        }

    </style>
</head>
<body  oncontextmenu='self.event.returnValue=false' onselectstart="return false" data-spy="scroll"><!--data-spy="scroll"-->

<div class="container">
    <div class="row">
        <div class="col-md-3" id="myscroll">
            <nav  id="nav" >
                <ul class="nav nav-pills nav-stacked">
                    <li class="active"><a href="#Section1">Section1</a></li>
                    <li><a href="#Section2">Section1</a></li>
                    <li><a href="#Section3">Section1</a></li>
                </ul>
            </nav>
        </div>
        <div class="col-md-9">
            <div id="Section1">
                <h4>这是section1的内容实现思路</strong>给导航的a标签的href写上对应的div的id名,再给body加上data-spy="scroll"来监听滚动条.还有可以用JS来实现</h4>
            </div>
            <div id="Section2">
                <h4>这是section2的内容实现思路</strong>给导航的a标签的href写上对应的div的id名,再给body加上data-spy="scroll"来监听滚动条.还有可以用JS来实现</h4>
            </div>
            <div id="Section3">
                <h4>这是section3的内容实现思路</strong>给导航的a标签的href写上对应的div的id名,再给body加上data-spy="scroll"来监听滚动条.还有可以用JS来实现</h4>
            </div>
        </div>
    </div>
</div>
<!--
<div class="container">
    <div class="row">
        <div class="col-md-3" id="myscroll">
            <nav  id="nav" >
                <ul class="nav nav-pills nav-stacked">
                    <li class="active"><a href="#Section1">Section1</a></li>
                    <li><a href="#Section2">Section2</a></li>
                    <li><a href="#Section3">Section3</a></li>
                </ul>
            </nav>
        </div>
        <div class="col-md-9">
            <div id="Section1">
                <h1><strong>这是section1的内容实现思路<、strong>给导航的a标签的href写上对应的div的id名,再给body加上data-spy="scroll"来监听滚动条.还有可以用JS来实现</h1>
            </div>
            <div id="Section2">
                <h1><strong>这是section2的内容实现思路</strong>给导航的a标签的href写上对应的div的id名,再给body加上data-spy="scroll"来监听滚动条.还有可以用JS来实现</h1>
            </div>
            <div id="Section3">
                <h1><strong>这是section3的内容实现思路</strong>给导航的a标签的href写上对应的div的id名,再给body加上data-spy="scroll"来监听滚动条.还有可以用JS来实现</h1>
            </div>
        </div>
    </div>
</div>-->

<!--<script>
    $(function(){
        $('body').scrollspy({
            target:"#myscroll",
        });
        $("#myscroll").on('activate.bs.scrollspy',function(){
            var activeItem = $("#myscroll li.active").text();
            alert('当前显示的是'+ activeItem);
        });
    });
</script>-->

<script>
     /*阻止右键菜单的默认*/
        function click(){
            if(event.button==2){
                alert( '本网站欢迎您 !!');
            }
        }
        document.onmousedown = click;
</script>

</body>
</html>